<template>
  <button :class="[size, state]" class="button">
    <slot></slot>
  </button>
</template>

<script setup>
const props = defineProps({
  size: {
    default: "base",
  },
  state: {
    default: "primary",
  },
});
</script>

<style lang="less" scoped>
.button {
  text-align: center;
  border: none;
  cursor: pointer;
}

// size
.max {
  min-width: 100px;
  height: 48px;
  border-radius: 24px;
  padding: 0 24px;
}

.base {
  min-width: 80px;
  height: 36px;
  border-radius: 24px;
  padding: 0 20px;
}

.small {
  min-width: 72px;
  height: 32px;
  border-radius: 24px;
  padding: 0 20px;
}

// state 是否选中 主次按钮
.primary {
  background-color: @gray-0;
  color: @gray-10;
}

.secondary {
  background: none;
  color: @gray-1;
  border: 1px solid @gray-0;
}

.cprimary {
  background-color: @primary-color;
  color: @gray-10;
  font-weight: 600;
}

.csecondary {
  background-color: @gray-10;
  color: @gray-0;
}
</style>
